import React, {Component} from 'react';
import { LocaleProvider} from 'antd';
import SiderCustom from './components/sidercustom2/SiderCustom';
import HeaderCustom1 from "./components/header-custom1/HeaderCustom1";
import Routes from './routes';

import zh_CN from 'antd/lib/locale-provider/zh_CN';

import 'moment/locale/zh-cn';


const otherData = [{
  key: '/app/animation', title: '近期访问', icon: 'rocket',
  subs: [
    {key: '/app/ui/map', title: '综合查询', component: 'MapUi'},
    {key: '/app/animation/basicAnimations', title: '采购大数据', component: 'BasicAnimations'},
    {key: '/app/animation/exampleAnimations', title: '废标数量', component: 'ExampleAnimations'},
  ],
},]


class App extends Component {


  render() {
    return (
      <LocaleProvider locale={zh_CN}>
        <div className="flex-box flex-column" style={{height: '100%'}}>
          <HeaderCustom1
            userName={'Yolance'}
            onPressHelp={() => console.log('点击了help')}
            onPressBell={() => console.log('点击了bell')}
            onPressEnter={(value) => console.log(value)}
          />
          <div className="flex flex-box">
            <SiderCustom
              otherData={otherData}
              menuClick={(item) => console.log('item', item)}
            />
            <div className="flex">
              <Routes/>
            </div>
          </div>
        </div>
      </LocaleProvider>
    );
  }
}

export default App;
